package ysm.controller.admin;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import ysm.entity.Recruitment;
import ysm.service.RecruitmentService;

@RestController
@RequestMapping("/public")
public class RecruitmentController {
	
	@Autowired
	private RecruitmentService recruitmentService;
	
	@RequestMapping("/deleteRecruitmentByPrimaryKey")
	public void deleteByPrimaryKey(Integer id) {
		recruitmentService.deleteByPrimaryKey(id);
	}

	@RequestMapping("/insertRecruitment")
	public void insert(Recruitment record) {
		recruitmentService.insert(record);
	}

	@RequestMapping("/insertRecruitmentSelective")
	public void insertSelective(Recruitment record) {
		recruitmentService.insertSelective(record);
	}

	@RequestMapping("/selectRecruitmentByPrimaryKey")
    public Recruitment selectByPrimaryKey(Integer id) {
    	return recruitmentService.selectByPrimaryKey(id);
    }

	@RequestMapping("/updateRecruitmentByPrimaryKeySelective")
    public void updateByPrimaryKeySelective(Recruitment record) {
    	recruitmentService.updateByPrimaryKeySelective(record);
    }

	@RequestMapping("/updateRecruitmentByPrimaryKey")
    public void updateByPrimaryKey(Recruitment record) {
    	recruitmentService.updateByPrimaryKey(record);
    }
    
	@RequestMapping("/loadAllRecruitment")
    public List loadAllRecruitment() {
    	return recruitmentService.loadAllRecruitment();
    }

}
